<template>
  <keep-alive :include="cachedRoutes" :max="keepAliveMaxNum">
    <router-view />
  </keep-alive>
</template>

<script>
  import { mapGetters } from 'vuex'
  import { keepAliveMaxNum } from '@/config'

  export default {
    name: 'VabKeepAlive',
    data() {
      return {
        keepAliveMaxNum,
      }
    },
    computed: {
      ...mapGetters({
        cachedRoutes: 'routes/cachedRoutes',
      }),
    },
  }
</script>
